<%@page import="java.util.List"%>
<%@page import="entity.Book"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page errorPage="error.jsp" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" charset="utf-8" />
        <style>
            p{
                display: block;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
                width: 70%;
                }
                #a1:hover{
                    color:#F90;
                }
                body{
                background: url(img/Bookbg.jpg);
                background-size: cover;
            }
        </style>
    </head>
    <body style=" background-color: whitesmoke">
        <div class="container">
        <h2 style="margin-left: 10px">查询结果</h2>
        <div style="position:absolute;left:1300px;top:20px;font-size: 25px"><a href="index" class="btn btn-warning">返回首页</a></div>
        <div style="width:1200px">
        <%
            List<Book> list=(List<Book>)request.getAttribute("list");
            for(Book book:list){
        %>
        <div style="float:left;margin:10px 10px;width:220px;">
            <a href="gbbi?id=<%=book.getId()%>" style="text-decoration:none" id="a1">
            <p style="font-size: 20px;width:220px"><%=book.getBookName()%></p>
            <div >
                <img  style="border-radius: 10px" src="img/<%=book.getCover()%>" width="220px" height="300px" alt="<%=book.getBookName()%>">
            </div>
            <div  >
                <p>编号：<%=book.getId()%></p>
                <p>作者：<%=book.getAuthor()%></p>
                <p>出版日期：<%=book.getPublishDate()%></p>
                <p>出版社：<%=book.getPublishHouse()%></p>
              </div>
        </a>
        </div>
            <%
                }
            %>
        </div>
        </div>
    </body>
</html>
